<style lang="scss">
#cmain {
    .mainContent {
        min-height: 425px;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0px 0px 15px 0px rgba(207, 207, 207, 1);
        padding-top: 10px;
        padding: 0px 30px;
        .mainContentLeft {
            float: left;
            width: 40%;
            margin-left: 10%;
        }
        .mainContentRight {
            float: right;
            width: 45%;
            margin-left: 5%;
        }
        .clearfix span {
            left: 290px;
            top: 132px;
            width: 115px;
            height: 23px;
            line-height: 23px;
            color: rgba(102, 102, 102, 1);
            font-size: 16px;
            text-align: center;
            font-family: Roboto;
        }
        .el-input--mini .el-input__inner {
            width: 202px;
        }
    }
    .el-icon-plus:before {
        color: #337aba;
        font-size: 20px;
        font-weight: 800;
        cursor: pointer;
    }
    .el-icon-minus:before {
        color: #e51c23;
        font-size: 20px;
        font-weight: 800;
        cursor: pointer;
    }
}
</style>

<template>
    <div id="cmain" class="family-tree-mask" v-loading="loading" element-loading-text="数据加载中，请稍等......">
        <div class="mainContent">
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>临床与治疗信息</span>
                </div>
                <div class="text item">
                    <div class="mainContentLeft">
                        <el-form ref="form" :model="datas" label-width="180px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="患癌部位">
                                <el-select v-model="datas.cancer_site" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="近端结肠" value="1"></el-option>
                                    <el-option label="远端结肠" value="2"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="临床分期cTNM">

                            </el-form-item>

                            <el-form-item label="T">
                                <el-select v-model="datas.t" placeholder="请选择" @change='changeTNM'>
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="TX" value="TX"></el-option>
                                    <el-option label="Tis" value="Tis"></el-option>
                                    <el-option label="T1" value="T1"></el-option>
                                    <el-option label="T2" value="T2"></el-option>
                                    <el-option label="T3" value="T3"></el-option>
                                    <el-option label="T4a" value="T4a"></el-option>
                                    <el-option label="T4b" value="T4b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="N">
                                <el-select v-model="datas.n" placeholder="请选择" @change='changeTNM'>
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="NX" value="NX"></el-option>
                                    <el-option label="N0" value="N0"></el-option>
                                    <el-option label="N1" value="N1"></el-option>
                                    <el-option label="N1a" value="N1a"></el-option>
                                    <el-option label="N1b" value="N1b"></el-option>
                                    <el-option label="N1c" value="N1c"></el-option>
                                    <el-option label="N2" value="N2"></el-option>
                                    <el-option label="N2a" value="N2a"></el-option>
                                    <el-option label="N2b" value="N2b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="M">
                                <el-select v-model="datas.m" placeholder="请选择" @change='changeTNM'>
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="M0" value="M0"></el-option>
                                    <el-option label="M1" value="M1"></el-option>
                                    <el-option label="M1a" value="M1a"></el-option>
                                    <el-option label="M1b" value="M1b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="临床分期结果：">
                                <el-input v-model="datas.tnm_result" readonly='readonly'></el-input>
                            </el-form-item>

                            <el-form-item label="DUKE：">
                                <el-input v-model="datas.duke" readonly='readonly'></el-input>
                            </el-form-item>

                            <el-form-item label="MAC：">
                                <el-input v-model="datas.mac" readonly='readonly'></el-input>
                            </el-form-item>

                            <el-form-item label="临床分期pTNM">

                            </el-form-item>

                            <el-form-item label="T">
                                <el-select v-model="datas.pt" placeholder="请选择" @change='changePTNM'>
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="pTX" value="pTX"></el-option>
                                    <el-option label="pTis" value="pTis"></el-option>
                                    <el-option label="pT1" value="pT1"></el-option>
                                    <el-option label="pT2" value="pT2"></el-option>
                                    <el-option label="pT3" value="pT3"></el-option>
                                    <el-option label="pT4a" value="pT4a"></el-option>
                                    <el-option label="pT4b" value="pT4b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="N">
                                <el-select v-model="datas.pn" placeholder="请选择" @change='changePTNM'>
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="NX" value="NX"></el-option>
                                    <el-option label="N0" value="N0"></el-option>
                                    <el-option label="N1" value="N1"></el-option>
                                    <el-option label="N1a" value="N1a"></el-option>
                                    <el-option label="N1b" value="N1b"></el-option>
                                    <el-option label="N1c" value="N1c"></el-option>
                                    <el-option label="N2" value="N2"></el-option>
                                    <el-option label="N2a" value="N2a"></el-option>
                                    <el-option label="N2b" value="N2b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="M">
                                <el-select v-model="datas.pm" placeholder="请选择" @change='changePTNM'>
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="M0" value="M0"></el-option>
                                    <el-option label="M1" value="M1"></el-option>
                                    <el-option label="M1a" value="M1a"></el-option>
                                    <el-option label="M1b" value="M1b"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="临床分期结果：">
                                <el-input v-model="datas.pTNM_tnm_result" readonly='readonly'></el-input>
                            </el-form-item>

                            <el-form-item label="DUKE：">
                                <el-input v-model="datas.pTNM_duke" readonly='readonly'></el-input>
                            </el-form-item>

                            <el-form-item label="MAC：">
                                <el-input v-model="datas.pTNM_mac" readonly='readonly'></el-input>
                            </el-form-item>

                            <el-form-item label="手术">
                                <el-select v-model="datas.operative_type" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="全结直肠切除术" value="1"></el-option>
                                    <el-option label="全结肠切除术" value="2"></el-option>
                                    <el-option label="全直肠切除术" value="3"></el-option>
                                    <el-option label="次全结肠切除术" value="4"></el-option>
                                    <el-option label="次全直肠切除术" value="5"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="是否生育">
                                <el-radio-group v-model="datas.noFe">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="初次生育年龄" v-if='datas.noFe==1'>
                                <el-input v-model="datas.first_childbearing_age"></el-input>
                            </el-form-item>
        

                            <el-form-item label="是否绝经">
                                <el-radio-group v-model="datas.menopause">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="绝经年龄"  v-if='datas.menopause==1'>
                                <el-select v-model="datas.menopause_age" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="≥55岁" value="1"></el-option>
                                    <el-option label="<55岁" value="2"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="免疫治疗">
                                <el-radio-group v-model="datas.immunotherapy">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="药物名称" v-if='datas.immunotherapy==1'>
                                <el-input v-model="immunotherapy_drug"></el-input>
                            </el-form-item>

                             <el-form-item label="是否患有糖尿病">
                                <el-radio-group v-model="datas.diabetes">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="治疗方式">
                                <el-select v-model="datas.diabetes_treatment" placeholder="请选择" v-if='datas.diabetes==1' >
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="胰岛素治疗" value="1"></el-option>
                                    <el-option label="非胰岛素治疗" value="2"></el-option>
                                </el-select>
                            </el-form-item>


                            <el-form-item label="错配修复缺陷检测">

                            </el-form-item>

                            <el-form-item label="MLH1">
                                <el-select v-model="datas.mhl1" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="未检测" value="1"></el-option>
                                    <el-option label="阳性" value="2"></el-option>
                                    <el-option label="阴性" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="MSH2">
                                <el-select v-model="datas.msh2" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="未检测" value="1"></el-option>
                                    <el-option label="阳性" value="2"></el-option>
                                    <el-option label="阴性" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="MSH6">
                                <el-select v-model="datas.MSH6" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="未检测" value="1"></el-option>
                                    <el-option label="阳性" value="2"></el-option>
                                    <el-option label="阴性" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="PMS2">
                                <el-select v-model="datas.pms2" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="未检测" value="1"></el-option>
                                    <el-option label="阳性" value="2"></el-option>
                                    <el-option label="阴性" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="微卫星不稳定性（MSI）">
                                <el-select v-model="datas.msi" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="未检测" value="1"></el-option>
                                    <el-option label="MSI-L" value="2"></el-option>
                                    <el-option label="MSI-H" value="3"></el-option>
                                    <el-option label="MSS" value="4"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="BRAF V600E">
                                <el-select v-model="datas.braf" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="未检测" value="1"></el-option>
                                    <el-option label="阳性" value="2"></el-option>
                                    <el-option label="阴性" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="MLH1启动子甲基化检测">
                                <el-select v-model="datas.mlh1detect" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="未检测" value="1"></el-option>
                                    <el-option label="阳性" value="2"></el-option>
                                    <el-option label="阴性" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                        </el-form>

                    </div>
                    <div class="mainContentRight">
                        <el-form ref="form" :model="datas" label-width="240px" :label-position="labelPosition" size='mini'>

                            <el-form-item label="是否使用含5FU方案化疗">
                                <el-radio-group v-model="datas._5fu_chemotherapy">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否使用含5FU方案放疗">
                                <el-radio-group v-model="datas._5fu_therapy">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否使用靶向治疗">
                                <el-radio-group v-model="datas.targeted_therapy">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否长期使用口服避孕药">
                                <el-radio-group v-model="datas.prophylactic">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否进行过激素替代治疗">
                                <el-radio-group v-model="datas.hormone">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否进行过盆腔放射治疗">
                                <el-radio-group v-model="datas.pelvic">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否接受过他莫昔芬治疗">
                                <el-radio-group v-model="datas.tamoxifen">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="超过一年服用二甲双胍">
                                <el-radio-group v-model="datas.metformin">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否服用过阿司匹林">
                                <el-radio-group v-model="datas.aspirin">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否具有维生素D缺乏">
                                <el-radio-group v-model="datas.vitamin_d">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="服用过非固醇类抗炎药预防">
                                <el-radio-group v-model="datas.non_steroidal">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="克罗恩病">
                                <el-radio-group v-model="datas.crohn_disease">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="患过溃疡型结肠炎">
                                <el-radio-group v-model="datas.ulcerative_colitis">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否患有炎性肠炎">
                                <el-radio-group v-model="datas.inflammatory_enteritis">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="是否患有慢性炎症性疾病">
                                <el-radio-group v-model="datas.chronic_inflammatory">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                        </el-form>
                    </div>
                </div>

            </el-card>

            <!--遗传性肿瘤综合征表型信息-->
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>遗传性肿瘤综合征表型信息</span>
                </div>
                <div class="text item">
                    <div class="mainContentLeft">
                        <el-form ref="form" :model="datas" label-width="240px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="自闭症谱系障碍">
                                <el-radio-group v-model="datas.asd">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="智力损伤（IQ≤75）">
                                <el-radio-group v-model="datas.intellectual_damage">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="血管异常（包括多发颅内静脉发育异常）">
                                <el-radio-group v-model="datas.vascular_anomaly">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="多发性甲状腺结节">
                                <el-radio-group v-model="datas.multiple_nodi_goitre">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="食道糖原棘皮症">
                                <el-radio-group v-model="datas.glycogen_spines">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.glycogen_spines=="1"'>
                                <el-input v-model="datas.glycogen_num"></el-input>
                            </el-form-item>

                            <el-form-item label="胃肠道错构瘤／神经节瘤">
                                <el-radio-group v-model="datas.hamartoma">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.hamartoma=="1"'>
                                <el-input v-model="datas.hamartoma_num"></el-input>
                            </el-form-item>

                            <el-form-item label="患有脂肪瘤">
                                <el-radio-group v-model="datas.lipomyoma">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="个数" v-if='datas.lipomyoma=="1"'>
                                <el-input v-model="datas.lipomyoma_number"></el-input>
                            </el-form-item>

                            <el-form-item label="皮肤黏膜病变">
                                <div>
                                    <el-checkbox v-model="datas.trichilemoma">毛鞘瘤</el-checkbox>
                                    <el-radio-group v-model="datas.trichilemoma_num" v-if='datas.trichilemoma==true'>
                                        <el-option label="请选择" value="0"></el-option>
                                        <el-radio label="2">＜3个</el-radio>
                                        <el-radio label="1">≥3个</el-radio>
                                    </el-radio-group>

                                </div>
                                <div>
                                    <el-checkbox v-model="datas.acrokeratoderma">肢端角化</el-checkbox>
                                    <el-radio-group v-model="datas.acrokeratoderma_num" v-if='datas.acrokeratoderma==true'>
                                        <el-option label="请选择" value="0"></el-option>
                                        <el-radio label="2">＜3个</el-radio>
                                        <el-radio label="1">≥3个</el-radio>
                                    </el-radio-group>
                                </div>
                                <div>
                                    <el-checkbox v-model="datas.mucocutaneous_lesion">皮肤黏膜神经瘤</el-checkbox>
                                    <el-radio-group v-model="datas.mnn" v-if='datas.mucocutaneous_lesion==true'>
                                        <el-option label="请选择" value="0"></el-option>
                                        <el-radio label="2">＜3个</el-radio>
                                        <el-radio label="1">≥3个</el-radio>
                                    </el-radio-group>
                                </div>
                                <div>
                                    <el-checkbox v-model="datas.oral_papilloma">口腔乳头瘤</el-checkbox>
                                    <el-radio-group v-model="datas.oral_papilloma_num" v-if='datas.oral_papilloma==true'>
                                        <el-option label="请选择" value="0"></el-option>
                                        <el-radio label="2">＜3个</el-radio>
                                        <el-radio label="1">≥3个</el-radio>
                                    </el-radio-group>
                                </div>

                            </el-form-item>

                        </el-form>
                    </div>
                    <div class="mainContentRight">
                        <el-form ref="form" :model="datas" label-width="180px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="儿童时期确诊为Bloom综合征">
                                <el-radio-group v-model="datas.bloom">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="成人 Lhermitte– Duclos病史">
                                <el-radio-group v-model="datas.lhermitte_duclos">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="患多发性或双侧性先天性视网膜色素上皮肥大">
                                <el-radio-group v-model="datas.noRetina">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="胃肠道息肉">
                                <el-select v-model="datas.gi_polyps" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="腺瘤性息肉" value="1"></el-option>
                                    <el-option label="锯齿状息肉" value="2"></el-option>
                                    <el-option label="幼年性息肉" value="3"></el-option>
                                    <el-option label="黑斑性息肉" value="4"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="诊断年龄">
                                <el-select v-model="datas.checkAge" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="＜40岁" value="1"></el-option>
                                    <el-option label="≤50岁" value="2"></el-option>
                                    <el-option label="＞50岁" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="息肉个数">
                                <el-input v-model="datas.number"></el-input>
                            </el-form-item>

                            <el-form-item label="息肉位置">
                                <el-select v-model="datas.location" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="靠近乙状结肠" value="1"></el-option>
                                    <el-option label="直肠" value="2"></el-option>
                                    <el-option label="结肠" value="3"></el-option>
                                    <el-option label="胃部" value="4"></el-option>
                                    <el-option label="整个胃肠道" value="5"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="大头畸形（头围）">
                                <el-select v-model="datas.macrocephalia" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label="<58cm" value="1"></el-option>
                                    <el-option label="58cm-60cm" value="2"></el-option>
                                    <el-option label=">60cm" value="3"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="生殖器官异常">
                                <el-checkbox-group v-model="datas.genital_anomaly">
                                    <el-checkbox label="阴茎斑点状色素沉着" name="type"></el-checkbox><br>
                                    <el-checkbox label="睾丸脂肪增多" name="type"></el-checkbox>
                                </el-checkbox-group>
                            </el-form-item>

                            <el-form-item label="息肉大小" v-if="datas.gi_polyps=='2'">
                                <el-select v-model="datas.sawtooth_size" placeholder="请选择">
                                    <el-option label="请选择" value="0"></el-option>
                                    <el-option label=">1cm" value="1"></el-option>
                                    <el-option label="≤cm" value="2"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="锯齿状息肉家族史" v-if="datas.gi_polyps=='2'">
                                <el-radio-group v-model="datas.sawtooth_family">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="幼年性息肉家族史" v-if="datas.gi_polyps=='3'">
                                <el-radio-group v-model="datas.juvenile_family">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="皮肤粘膜色素沉着过度" v-if="datas.gi_polyps=='4'">
                                <el-radio-group v-model="datas.darkspot_skin">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="黑斑性息肉家族史" v-if="datas.gi_polyps=='4'">
                                <el-radio-group v-model="datas.darkspot_family">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                        </el-form>
                    </div>
                </div>

            </el-card>

            <!--基因检测信息-->
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>基因检测信息</span>
                </div>
                <div class="text item gene-item">
                    <template>
                        <el-table
                            type=index
                            :data="datas.results"
                            border
                            style="width: 100%">

                            <el-table-column
                            fixed="left"
                            label="操作">
                            <template slot-scope="scope">
                                <i class="el-icon-plus" @click="addGen(scope.$index)"></i>
                                <i class="el-icon-minus" @click="removeGen(scope.$index)"></i>
                            </template>
                            </el-table-column>

                            <el-table-column
                            fixed
                            contentEditable
                            prop="detection_result_gene"
                            label="基因"
                            width="240">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.detection_result_gene" placeholder="只能输入大写字母和数字"></el-input>
                            </template>
                            </el-table-column>

                            <el-table-column
                            prop="detection_result_trans"
                            label="转录本号"
                            width="240">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.detection_result_trans" placeholder="请输入转录本号"></el-input>
                            </template>
                            </el-table-column>

                            <el-table-column
                            prop="detection_result_varia"
                            label="变异位点"
                            width="240">
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.detection_result_varia" placeholder="请输入变异位点"></el-input>
                            </template>
                            </el-table-column>

                            <el-table-column
                            label="检测类型">
                            <template slot-scope="scope">
                                    <el-select v-model="scope.row.assay_type" placeholder="请选择">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option label="全基因组" value="1"></el-option>
                                        <el-option label="全外显子检测" value="2"></el-option>
                                        <el-option label="panel检测" value="3"></el-option>
                                        <el-option label="sanger测序" value="4"></el-option>
                                        <el-option label="MLPA" value="5"></el-option>

                                    </el-select>                             
                            </template>
                            </el-table-column>

                            <el-table-column
                            label="功能改变">
                            <template slot-scope="scope">
                               
                                    <el-select v-model="scope.row.functional_change" placeholder="请选择" v-if='scope.row.functional_change!="6"'>
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option label="错义突变" value="1"></el-option>
                                        <el-option label="无义突变" value="2"></el-option>
                                        <el-option label="移码突变" value="3"></el-option>
                                        <el-option label="同义突变" value="4"></el-option>
                                        <el-option label="剪接位点突变" value="5"></el-option>
                                        <el-option label="其他" value="6"></el-option>

                                    </el-select>
                                    <div v-else>
                                        <el-input v-model="scope.row.other_function_change"></el-input>
                                        <i class="el-icon-error" @click="goBackSelect(scope.row)"></i>
                                    </div>
                                    
                                    
                               
                            </template>
                            </el-table-column>

                            <el-table-column
                            label="突变类型">
                            <template slot-scope="scope">
                               
                                    <el-select v-model="scope.row.mutation_type" placeholder="请选择">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option label="致病的" value="1"></el-option>
                                        <el-option label="可能致病的" value="2"></el-option>
                                        <el-option label="意义不明确的" value="3"></el-option>
                                        <el-option label="可能良性的" value="4"></el-option>
                                        <el-option label="良性的" value="5"></el-option>

                                    </el-select>
                               
                            </template>
                            </el-table-column>
                            
                            
                        </el-table>
                    </template>



                </div>
            </el-card>

            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <span>生活方式</span>
                </div>
                <div class="text item">
                    <div class="mainContentLeft">
                        <el-form ref="form" :model="datas" label-width="140px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="吸烟">
                                <el-radio-group v-model="datas.smoking">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="" v-if='datas.smoking==1' label-width="200px">
                                <el-input size="small" v-model="datas.smoking_cycle" style='width:50px'></el-input> &nbsp;&nbsp;包/周&nbsp;X&nbsp;
                                <el-input size="small" v-model="datas.smoking_year" style='width:50px'></el-input> &nbsp;&nbsp;年
                            </el-form-item>

                            <el-form-item label="饮酒">
                                <el-radio-group v-model="datas.drink">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                            <el-form-item label="" v-if='datas.drink==1' label-width="200px">
                                <el-input size="small" v-model="datas.drink_cycle" style='width:50px'></el-input> &nbsp;&nbsp;次/周
                            </el-form-item>

                            <el-form-item label="高脂高红肉类饮食">
                                <el-radio-group v-model="datas.fatty_meat">
                                    <el-radio label="1">是</el-radio>
                                    <el-radio label="2">否</el-radio>
                                </el-radio-group>
                            </el-form-item>

                        </el-form>
                    </div>
                    <div class="mainContentRight">
                        <el-form ref="form" :model="datas" label-width="140px" :label-position="labelPosition" size='mini'>
                            <el-form-item label="每日蔬菜摄入量">
                                <el-select v-model="datas.vegetable_consum" placeholder="请选择">
                                    <el-option label="≥500mg" value="1"></el-option>
                                    <el-option label="＜500mg" value="2"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="每日运动消耗量">
                                <el-select v-model="datas.dec" placeholder="请选择">
                                    <el-option label="基本无运动量" value="1"></el-option>
                                    <el-option label="30-50大卡" value="2"></el-option>
                                    <el-option label="50-100大卡" value="3"></el-option>
                                    <el-option label="100-200大卡" value="4"></el-option>
                                    <el-option label="200-300大卡" value="5"></el-option>
                                    <el-option label="＞300大卡" value="6"></el-option>
                                </el-select>
                            </el-form-item>

                            <el-form-item label="体重（kg）">
                                <el-input v-model="datas.weight" @change="getBmi"></el-input>
                            </el-form-item>

                            <el-form-item label="身高（cm）">
                                <el-input v-model="datas.height" @change="getBmi"></el-input>
                            </el-form-item>

                            <el-form-item label="BMI">
                                <!-- <el-input v-model="datas.bmi" readonly='readonly'></el-input> -->
                                 <div>
                                     {{datas.bmi}}
                                 </div>
                            </el-form-item>

                        </el-form>
                    </div>
                </div>

            </el-card>
            <el-card class="box-card footer-card">
                <div slot="header">
                    <Button  style="float: right; margin-left:20px;" @click="onClose">取消</Button>
                    <Button type="primary" style="float: right;" @click="save">保存</Button>    
                </div>
            </el-card>

        </div>
    </div>
</template>
<script>
import { setCookie, getCookie, delCookie } from "@/common/js/cookie.js";
import { familyTree } from "../../../api/basic/familyTree/familyTree.js";
export default {
    name: "jzca", //结直肠癌
    data() {
        return {
            loading: false,
            labelPosition: "left", //表单对齐方式
            sendObj: {
                //查找参数
                userId: "",
                familyTreeId: "",
                familyUserId: "",
                cancerId: ""
            },
            datas: {
                cancer_site: "", //癌症部位
                t: "",
                n: "",
                m: "",
                tnm_result: "", //临床分期结果
                duke: "",
                mac: "",
                pt:"",
                pn:"",
                pm:'',
                pTNM_tnm_result:"",
                pTNM_duke:"",
                pTNM_mac:'',
                operative_type: "", //手术
                noFe: "2", //是否生育
                first_childbearing_age: "", //初次生育年龄
                menopause: "2", //是否绝经
                menopause_age: "", //绝经年龄
                immunotherapy: "2", //免疫治疗
                immunotherapy_drug: "", //药物名称
                diabetes: "2", //是否患有糖尿病
                diabetes_treatment: "", //治疗方式
                _5fu_chemotherapy: "2", //是否使用含5FU方案化疗
                _5fu_therapy: "2", //是否使用含5FU方案放疗
                targeted_therapy: "2", //是否使用靶向治疗
                prophylactic: "2", //是否长期使用口服避孕药
                hormone: "2", //是否进行过激素替代治疗
                pelvic: "2", //是否进行过盆腔放射治疗
                tamoxifen: "2", //是否接受过他莫昔芬治疗
                metformin: "2", //超过一年服用二甲双胍
                aspirin: "2", //是否服用过阿司匹林
                vitamin_d: "2", //是否具有维生素D缺乏
                non_steroidal: "2", //服用过非固醇类抗炎药预防
                crohn_disease: "2", //克罗恩病
                ulcerative_colitis: "2", //患过溃疡型结肠炎
                inflammatory_enteritis: "2", //是否患有炎性肠炎
                chronic_inflammatory: "2", //是否患有慢性炎症性疾病
                mhl1: "", //mhl1
                msh2: "",
                MSH6: "",
                pms2: "",
                msi: "",
                braf: "",
                mlh1detect: "", //MLH1启动子甲基化检测
                asd: "2", //自闭症谱系障碍
                intellectual_damage: "2", //智力损伤（IQ≤75）
                vascular_anomaly: "2", //血管异常（包括多发颅内静脉发育异常）
                multiple_nodi_goitre: "2", //多发性甲状腺结节
                glycogen_spines: "2", //食道糖原棘皮症
                glycogen_spines_num: "", //食道糖原棘皮症个数
                hamartoma: "2", //胃肠道错构瘤／神经节瘤
                hamartoma_num: "", //胃肠道错构瘤／神经节瘤个数
                lipomyoma: "2", //患有脂肪瘤
                lipomyoma_number: "", //患有脂肪瘤个数
                trichilemoma: false, //毛鞘瘤
                trichilemoma_num: "2", //毛鞘瘤数量
                acrokeratoderma: false, //肢端角化
                acrokeratoderma_num: "2", //肢端角化数量
                mucocutaneous_lesion: false, //皮肤黏膜神经瘤
                mnn: "2", //皮肤黏膜神经瘤数量
                oral_papilloma: false, //口腔乳头瘤
                oral_papilloma_num: "2", //口腔乳头瘤数量
                bloom: "2", //儿童时期确诊为Bloom综合征
                lhermitte_duclos: "2", //成人 Lhermitte– Duclos病史
                noRetina: "2", //患多发性或双侧性先天性视网膜色素上皮肥大
                gi_polyps: "", //胃肠道息肉
                checkAge: "", //诊断年龄
                number: "", //息肉个数
                location: "", //息肉位置
                sawtooth_size: "", //息肉大小
                sawtooth_family: "2", //锯齿状息肉家族史
                juvenile_family: "2", //幼年性息肉家族史
                darkspot_skin: "2", //皮肤粘膜色素沉着过度
                darkspot_family: "2", //黑斑性息肉家族史
                macrocephalia: "", //大头畸形（头围）
                genital_anomaly: [], //生殖器官异常
                results: [
                    {
                        assay_type: "",
                        detection_result_gene: "",
                        detection_result_trans: "",
                        detection_result_varia: "",
                        functional_change: "",
                        other_function_change: "",
                        mutation_type: ""
                    }
                ],
                smoking: "2",
                drink: "2",
                vegetable_consum: "",
                fatty_meat: "2",
                dec: "",
                drink_cycle: "",
                bmi: "",
                height: "",
                weight: "",
                smoking_cycle: "",
                smoking_year: ""
            }
        };
    },
    components: {},
    mounted() {
        document.title = "结直肠癌辅助信息";
        this.getOneById();
        this.getBmi();
        this.loading = true;
        familyTree
            .findOneFromCancer(this.sendObj)
            .then(res => {
                console.log(res);
                if (res.returnCode == 0 || res.returnCode == 200) {
                    if (res.data && res.data.familyCancer) {
                        this.datas = res.data.familyCancer;
                    }
                } else {
                    this.$Message.error(res.msg);
                }
                this.loading = false;
            })
            .catch(error => {
                this.loading = false;
            });
    },
    created() {},
    methods: {
        onClose() {
            window.close();
        },
        //功能改变
        goBackSelect(row) {
            row.functional_change = "";
        },
        changeTNM() {
            let t = this.datas.t;
            let n = this.datas.n;
            let m = this.datas.m;

            if (!t || !n || !m) {
                this.datas.tnm_result = "无分期";
                this.datas.duke = "-";
                this.datas.mac = "-";
                return;
            }
            if (n == "NX") {
                this.datas.duke = "-";
                this.datas.mac = "-";
            }
            if ((t == "TX" || t == "pTX") && (m != "M1a" || m != "M1b")) {
                this.datas.tnm_result = "无分期";
                this.datas.duke = "-";
                this.datas.mac = "-";
            }
            if (t == "Tis" || t == "pTis") {
                this.datas.duke = "-";
                this.datas.mac = "-";
            }
            if (n == "N2") {
                this.datas.tnm_result = "无分期";
                this.datas.duke = "-";
                this.datas.mac = "-";
            }
            if (m == "M1") {
                this.datas.tnm_result = t + n + m + "  IV期";
                this.datas.duke = "-";
                this.datas.mac = "-";
                return;
            } else if (m == "M1a") {
                this.datas.tnm_result = t + n + m + "  IVA期";
                this.datas.duke = "-";
                this.datas.mac = "-";
            }
            if (m == "M1b") {
                this.datas.tnm_result = t + n + m + "  IVB期";
            } else {
                if (
                    (t == "T4b" && n == "N1") ||
                    (t == "T4b" && n == "N2") ||
                    (t == "T4b" && n == "N2a") ||
                    (t == "T4b" && n == "N2b") ||
                    (t == "T4b" && n == "N1a") ||
                    (t == "T4b" && n == "N1b") ||
                    (t == "T4b" && n == "N1c") ||
                    ((t == "T4a" && n == "N1") ||
                        (t == "T4b" && n == "N1") ||
                        (t == "T4b" && n == "N2") ||
                        (t == "pT4b" && n == "N2") ||
                        (t == "pT4b" && n == "N2a") ||
                        (t == "pT4b" && n == "N2b") ||
                        (t == "pT4b" && n == "N1a") ||
                        (t == "pT4b" && n == "N1b") ||
                        (t == "pT4b" && n == "N1c"))
                ) {
                    this.datas.tnm_result = t + n + m + "  IIIC期";
                    this.datas.duke = "C";
                    this.datas.mac = "C3";
                }
                if (
                    (t == "T4a" && n == "N2b") ||
                    (t == "T3" && n == "N2b") ||
                    (t == "T4a" && n == "N2a") ||
                    ((t == "pT4a" && n == "N2b") ||
                        (t == "pT3" && n == "N2b") ||
                        (t == "pT4a" && n == "N2a"))
                ) {
                    this.datas.tnm_result = t + n + m + "  IIIC期";
                    this.datas.duke = "C";
                    this.datas.mac = "C2";
                }
                if (
                    (t == "T2" && n == "N2b") ||
                    (t == "T1" && n == "N2b") ||
                    ((t == "pT2" && n == "N2b") || (t == "pT1" && n == "N2b"))
                ) {
                    this.datas.tnm_result = t + n + m + "  IIIB期";
                    this.datas.duke = "C";
                    this.datas.mac = "C1";
                }
                if (
                    (t == "T2" && n == "N2a") ||
                    (t == "T3" && n == "N2a") ||
                    ((t == "pT2" && n == "N2a") || (t == "pT3" && n == "N2a"))
                ) {
                    this.datas.tnm_result = t + n + m + "  IIIB期";
                    this.datas.duke = "C";
                    this.datas.mac = "C1/C2";
                }
                if (
                    (t == "T4a" && n == "N1") ||
                    (t == "T3" && n == "N1") ||
                    (t == "T3" && n == "N1a") ||
                    (t == "T3" && n == "N1b") ||
                    (t == "T3" && n == "N1c") ||
                    (t == "T4a" && n == "N1a") ||
                    (t == "T4a" && n == "N1b") ||
                    (t == "T4a" && n == "N1c") ||
                    ((t == "pT4a" && n == "N1") ||
                        (t == "pT3" && n == "N1a") ||
                        (t == "pT3" && n == "N1b") ||
                        (t == "pT3" && n == "N1c") ||
                        (t == "pT4a" && n == "N1a") ||
                        (t == "pT4a" && n == "N1b") ||
                        (t == "pT4a" && n == "N1c") ||
                        (t == "pT3" && n == "N1"))
                ) {
                    this.datas.tnm_result = t + n + m + "  IIIB期";
                    this.datas.duke = "C";
                    this.datas.mac = "C2";
                }
                if (
                    (t == "T2" && n == "N1") ||
                    (t == "T1" && n == "N1") ||
                    (t == "T1" && n == "N1a") ||
                    (t == "T1" && n == "N1b") ||
                    (t == "T1" && n == "N1c") ||
                    (t == "T2" && n == "N1a") ||
                    (t == "T2" && n == "N1b") ||
                    (t == "T2" && n == "N1c") ||
                    (t == "T1" && n == "N2a") ||
                    ((t == "pT2" && n == "N1") ||
                        (t == "pT1" && n == "N1") ||
                        (t == "pT1" && n == "N1a") ||
                        (t == "pT1" && n == "N1b") ||
                        (t == "pT1" && n == "N1c") ||
                        (t == "pT2" && n == "N1a") ||
                        (t == "pT2" && n == "N1b") ||
                        (t == "pT2" && n == "N1c") ||
                        (t == "pT1" && n == "N2a"))
                ) {
                    this.datas.tnm_result = t + n + m + "  IIIA期";
                    this.datas.duke = "C";
                    this.datas.mac = "C1";
                }
                if (t == "T4b" || t == "pT4b") {
                    if (n == "N0") {
                        this.datas.tnm_result = t + n + m + "  IIC期";
                        this.datas.duke = "B";
                        this.datas.mac = "B3";
                    }
                }
                if (t == "T4a" || t == "pT4a") {
                    if (n == "N0") {
                        this.datas.tnm_result = t + n + m + "  IIB期";
                        this.datas.duke = "B";
                        this.datas.mac = "B2";
                    }
                }
                if (t == "T3" || t == "pT3") {
                    if (n == "N0") {
                        this.datas.tnm_result = t + n + m + "  IIA期";
                        this.datas.duke = "B";
                        this.datas.mac = "B2";
                    }
                }
                if (t == "T2" || t == "T1" || t == "pT2" || t == "pT1") {
                    if (n == "N0") {
                        this.datas.duke = "A";
                        this.datas.tnm_result = t + n + m + "  I期";
                        if (t == "T2" || t == "pT2") {
                            this.datas.mac = "B1";
                        } else {
                            this.datas.mac = "A";
                        }
                    }
                }
                if (t == "Tis" || t == "pTis") {
                    if (n == "N0") {
                        this.datas.tnm_result = t + n + m + "  0期";
                        this.datas.duke = "-";
                        this.datas.mac = "-";
                    }
                }
            }
        },
        changePTNM(){
            let t = this.datas.pt;
            let n = this.datas.pn;
            let m = this.datas.pm;

            if (!t || !n || !m) {
                this.datas.pTNM_tnm_result = "无分期";
                this.datas.pTNM_duke = "-";
                this.datas.pTNM_mac = "-";
                return;
            }
            if (n == "NX") {
                this.datas.pTNM_duke = "-";
                this.datas.pTNM_mac = "-";
            }
            if ((t == "TX" || t == "pTX") && (m != "M1a" || m != "M1b")) {
                this.datas.pTNM_tnm_result = "无分期";
                this.datas.pTNM_duke = "-";
                this.datas.pTNM_mac = "-";
            }
            if (t == "Tis" || t == "pTis") {
                this.datas.pTNM_duke = "-";
                this.datas.pTNM_mac = "-";
            }
            if (n == "N2") {
                this.datas.pTNM_tnm_result = "无分期";
                this.datas.pTNM_duke = "-";
                this.datas.pTNM_mac = "-";
            }
            if (m == "M1") {
                this.datas.pTNM_tnm_result = t + n + m + "  IV期";
                this.datas.pTNM_duke = "-";
                this.datas.pTNM_mac = "-";
                return;
            } else if (m == "M1a") {
                this.datas.pTNM_tnm_result = t + n + m + "  IVA期";
                this.datas.pTNM_duke = "-";
                this.datas.pTNM_mac = "-";
            }
            if (m == "M1b") {
                this.datas.pTNM_tnm_result = t + n + m + "  IVB期";
            } else {
                if (
                    (t == "T4b" && n == "N1") ||
                    (t == "T4b" && n == "N2") ||
                    (t == "T4b" && n == "N2a") ||
                    (t == "T4b" && n == "N2b") ||
                    (t == "T4b" && n == "N1a") ||
                    (t == "T4b" && n == "N1b") ||
                    (t == "T4b" && n == "N1c") ||
                    ((t == "T4a" && n == "N1") ||
                        (t == "T4b" && n == "N1") ||
                        (t == "T4b" && n == "N2") ||
                        (t == "pT4b" && n == "N2") ||
                        (t == "pT4b" && n == "N2a") ||
                        (t == "pT4b" && n == "N2b") ||
                        (t == "pT4b" && n == "N1a") ||
                        (t == "pT4b" && n == "N1b") ||
                        (t == "pT4b" && n == "N1c"))
                ) {
                    this.datas.pTNM_tnm_result = t + n + m + "  IIIC期";
                    this.datas.pTNM_duke = "C";
                    this.datas.pTNM_mac = "C3";
                }
                if (
                    (t == "T4a" && n == "N2b") ||
                    (t == "T3" && n == "N2b") ||
                    (t == "T4a" && n == "N2a") ||
                    ((t == "pT4a" && n == "N2b") ||
                        (t == "pT3" && n == "N2b") ||
                        (t == "pT4a" && n == "N2a"))
                ) {
                    this.datas.pTNM_tnm_result = t + n + m + "  IIIC期";
                    this.datas.pTNM_duke = "C";
                    this.datas.pTNM_mac = "C2";
                }
                if (
                    (t == "T2" && n == "N2b") ||
                    (t == "T1" && n == "N2b") ||
                    ((t == "pT2" && n == "N2b") || (t == "pT1" && n == "N2b"))
                ) {
                    this.datas.pTNM_tnm_result = t + n + m + "  IIIB期";
                    this.datas.pTNM_duke = "C";
                    this.datas.pTNM_mac = "C1";
                }
                if (
                    (t == "T2" && n == "N2a") ||
                    (t == "T3" && n == "N2a") ||
                    ((t == "pT2" && n == "N2a") || (t == "pT3" && n == "N2a"))
                ) {
                    this.datas.pTNM_tnm_result = t + n + m + "  IIIB期";
                    this.datas.pTNM_duke = "C";
                    this.datas.pTNM_mac = "C1/C2";
                }
                if (
                    (t == "T4a" && n == "N1") ||
                    (t == "T3" && n == "N1") ||
                    (t == "T3" && n == "N1a") ||
                    (t == "T3" && n == "N1b") ||
                    (t == "T3" && n == "N1c") ||
                    (t == "T4a" && n == "N1a") ||
                    (t == "T4a" && n == "N1b") ||
                    (t == "T4a" && n == "N1c") ||
                    ((t == "pT4a" && n == "N1") ||
                        (t == "pT3" && n == "N1a") ||
                        (t == "pT3" && n == "N1b") ||
                        (t == "pT3" && n == "N1c") ||
                        (t == "pT4a" && n == "N1a") ||
                        (t == "pT4a" && n == "N1b") ||
                        (t == "pT4a" && n == "N1c") ||
                        (t == "pT3" && n == "N1"))
                ) {
                    this.datas.pTNM_tnm_result = t + n + m + "  IIIB期";
                    this.datas.pTNM_duke = "C";
                    this.datas.pTNM_mac = "C2";
                }
                if (
                    (t == "T2" && n == "N1") ||
                    (t == "T1" && n == "N1") ||
                    (t == "T1" && n == "N1a") ||
                    (t == "T1" && n == "N1b") ||
                    (t == "T1" && n == "N1c") ||
                    (t == "T2" && n == "N1a") ||
                    (t == "T2" && n == "N1b") ||
                    (t == "T2" && n == "N1c") ||
                    (t == "T1" && n == "N2a") ||
                    ((t == "pT2" && n == "N1") ||
                        (t == "pT1" && n == "N1") ||
                        (t == "pT1" && n == "N1a") ||
                        (t == "pT1" && n == "N1b") ||
                        (t == "pT1" && n == "N1c") ||
                        (t == "pT2" && n == "N1a") ||
                        (t == "pT2" && n == "N1b") ||
                        (t == "pT2" && n == "N1c") ||
                        (t == "pT1" && n == "N2a"))
                ) {
                    this.datas.pTNM_tnm_result = t + n + m + "  IIIA期";
                    this.datas.pTNM_duke = "C";
                    this.datas.pTNM_mac = "C1";
                }
                if (t == "T4b" || t == "pT4b") {
                    if (n == "N0") {
                        this.datas.pTNM_tnm_result = t + n + m + "  IIC期";
                        this.datas.pTNM_duke = "B";
                        this.datas.pTNM_mac = "B3";
                    }
                }
                if (t == "T4a" || t == "pT4a") {
                    if (n == "N0") {
                        this.datas.pTNM_tnm_result = t + n + m + "  IIB期";
                        this.datas.pTNM_duke = "B";
                        this.datas.pTNM_mac = "B2";
                    }
                }
                if (t == "T3" || t == "pT3") {
                    if (n == "N0") {
                        this.datas.pTNM_tnm_result = t + n + m + "  IIA期";
                        this.datas.pTNM_duke = "B";
                        this.datas.pTNM_mac = "B2";
                    }
                }
                if (t == "T2" || t == "T1" || t == "pT2" || t == "pT1") {
                    if (n == "N0") {
                        this.datas.pTNM_duke = "A";
                        this.datas.pTNM_tnm_result = t + n + m + "  I期";
                        if (t == "T2" || t == "pT2") {
                            this.datas.pTNM_mac = "B1";
                        } else {
                            this.datas.pTNM_mac = "A";
                        }
                    }
                }
                if (t == "Tis" || t == "pTis") {
                    if (n == "N0") {
                        this.datas.pTNM_tnm_result = t + n + m + "  0期";
                        this.datas.pTNM_duke = "-";
                        this.datas.pTNM_mac = "-";
                    }
                }
            }
        },
        addGen(row) {
            let obj = {
                assay_type: "",
                detection_result_gene: "",
                detection_result_trans: "",
                detection_result_varia: "",
                functional_change: "",
                other_function_change: "",
                mutation_type: ""
            };
            ++row;
            this.datas.results.splice(row, 0, obj);
        },
        removeGen(row) {
            if (this.datas.results.length <= 1) {
                this.$Message.info("最少为一条，不可删除了");
                return;
            }
            this.datas.results.splice(row, 1);
        },
        tableRowClassName(row, index) {
            row.index = index;
        },
        save() {
            let saveObj = {
                cancerId: this.sendObj.cancerId,
                familyTreeId: this.sendObj.familyTreeId,
                userId: this.sendObj.userId,
                familyUserId: this.sendObj.familyUserId,
                familyCancer: this.datas
            };
            this.loading = true;
            familyTree
                .saveOrUpdateCancerForm(saveObj)
                .then(res => {
                    if (res.returnCode == 0 || res.returnCode == 200) {
                        this.$Message.success("保存" + res.msg);
                    } else {
                        this.$Message.error(res.msg);
                    }
                    this.loading = false;
                })
                .catch(error => {
                    this.loading = false;
                });
        },
        getBmi() {
            let bmi =
                Math.round(
                    this.datas.weight /
                        Math.pow(this.datas.height / 100, 2) *
                        100
                ) / 100;
            if (isNaN(bmi) || bmi == Infinity) {
                this.datas.bmi = "";
            } else {
                this.datas.bmi = bmi;
            }
        },
        getOneById() {
            let obj = M.url();
            this.sendObj.cancerId = obj.cancerId;
            this.sendObj.familyTreeId = obj.familyTreeId;
            this.sendObj.userId = getCookie("userid");
            this.sendObj.familyUserId = obj.current_personid;
        }
    }
};
</script>
